package com.example.demo03_mvm.db;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import java.util.List;

import io.reactivex.Completable;
import io.reactivex.Flowable;

@Dao
public interface GoodsDao {

    @Insert
    Completable insert(Goods goods);

    @Query("select * from good where id=:gid")
    Flowable<List<Goods>> getGoods(int gid);

    @Query("select * from good")
    Flowable<List<Goods>> getGoodsList();

}
